.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* 注册容器 */
.register-container {
    background-color: var(--card-bg);
    width: 100%;
    max-width: 480px;
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.register-container:hover {
    transform: translateY(-0.5px);
    box-shadow: var(--hover-shadow);
}

/* 注册头部 */
.register-header {
    text-align: center;
    margin-bottom: 30px;
}

.register-header h1 {
    color: var(--primary-color);
    font-size: 28px;
    margin-bottom: 8px;
    font-weight: 600;
}

.register-header p {
    color: var(--icon-color);
    font-size: 14px;
}

/* 表单组 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--icon-color);
    font-size: 16px;
}

.input-with-icon input {
    width: 100%;
    padding: 14px 15px 14px 45px;
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.input-with-icon input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.2);
    outline: none;
}

.input-with-icon input.error {
    border-color: var(--error-color);
}

.input-with-icon input.success {
    border-color: var(--success-color);
}

.error-message {
    color: var(--error-color);
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

/* 验证码输入组 */
.code-input-group {
    display: flex;
    align-content: space-between;
    gap: 60px;
}

.code-input-group input {
    width: 121%;
}

.send-code-btn {
    padding: 0 15px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    white-space: nowrap;
    min-width: 120px;
}

.send-code-btn:hover {
    background-color: var(--secondary-color);
}

.send-code-btn:active {
    transform: translateY(1px);
}

.send-code-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* 验证码容器 */
.captcha-container {
    display: flex;
    align-items: center;
    gap: 60px;
}

.input-with-icon #captcha {
    min-width: 120%;
}

.captcha-img {
    min-width: 120px;
    height: 45px;
    background-color: var(--input-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    letter-spacing: 2px;
    color: var(--text-color);
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    font-size: 18px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease;
}

.captcha-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.captcha-img:hover {
    transform: scale(1.03);
}

.refresh-captcha {
    width: 45px;
    height: 45px;
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--icon-color);
    transition: all 0.3s ease;
}

.refresh-captcha:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 表单页脚 */
.form-footer {
    margin-top: 30px;
}

.terms-agreement {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    font-size: 13px;
    color: var(--icon-color);
}

.terms-agreement input {
    margin-right: 10px;
    accent-color: var(--primary-color);
}

.terms-agreement a {
    color: var(--primary-color);
    text-decoration: none;
    margin: 0 3px;
}

.terms-agreement a:hover {
    text-decoration: underline;
}

/* 注册按钮 */
.register-btn {
    width: 100%;
    padding: 14px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.register-btn:hover {
    background-color: var(--secondary-color);
}

.register-btn:active {
    transform: translateY(1px);
}

.register-btn i {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.register-btn:hover i {
    transform: translateX(3px);
}

/* 登录链接 */
.login-link {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--icon-color);
}

.login-link a {
    color: var(--primary-color);
    text-decoration: none;
    margin-left: 5px;
}

.login-link a:hover {
    text-decoration: underline;
}

/* 动画效果 */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(67, 97, 238, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(67, 97, 238, 0); }
    100% { box-shadow: 0 0 0 0 rgba(67, 97, 238, 0); }
}

.pulse {
    animation: pulse 1.5s infinite;
}

/* 法律文档容器 */
.legal-container {
    background-color: var(--card-bg);
    max-width: 800px;
    margin: 40px auto;
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.legal-container:hover {
    transform: translateY(-3px);
}

/* 文档头部 */
.legal-header {
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 20px;
    margin-bottom: 30px;
    position: relative;
}

.legal-header h1 {
    color: var(--primary-color);
    font-size: 32px;
    text-align: center;
}

.back-link {
    position: absolute;
    top: 5px;
    left: 0;
}

.back-link a {
    color: var(--icon-color);
    text-decoration: none;
    font-size: 14px;
}

.back-link a:hover {
    color: var(--primary-color);
}

/* 内容区域 */
.legal-content {
    line-height: 1.8;
    font-size: 15px;
}

.legal-content section {
    margin-bottom: 40px;
    padding: 20px;
    background-color: var(--input-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.legal-content h2 {
    color: var(--primary-color);
    font-size: 20px;
    margin-bottom: 15px;
    padding-left: 30px;
    position: relative;
}

.legal-content h2 i {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

.legal-content ul, .legal-content ol {
    padding-left: 25px;
    margin: 15px 0;
}

.legal-content li {
    margin-bottom: 8px;
    padding-left: 10px;
}

.effective-date, .update-info {
    text-align: right;
    font-size: 14px;
    color: var(--icon-color);
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px dashed var(--border-color);
}
